package com.zkjl.protect_business.dto;

import com.zkjl.protect_business.entity.OrgField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Field;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Data
@ApiModel(description = "单位DTO")
public class OrganizationDTO {

    @ApiModelProperty(notes = "单位名称")
    @NotBlank(message = "单位名称不能为空")
    private String orgName;

    @ApiModelProperty(notes = "编号")
    @NotBlank(message = "编号不能为空")
    private String orgNum;

    @ApiModelProperty(notes = "驻防地区")
    @NotBlank(message = "驻防地区不能为空")
    private String region;

    @ApiModelProperty(notes = "在编人数")
    private Integer number;

    @ApiModelProperty(notes = "父级单位 id")
    private String pid;

    @ApiModelProperty(notes = "扩展字段")
    private List<OrgField> fields;

}
